package com.onlineshop.helloworld.dao.impl;

import com.onlineshop.common.dao.GenericDao;
import com.onlineshop.helloworld.bean.HelloWorld;
import com.onlineshop.helloworld.dao.IHelloWorldDAO;

public class IHelloWorldDAOImpl implements IHelloWorldDAO {

 	private GenericDao dao;

	@Override
	public boolean add(HelloWorld test) throws Exception {
		boolean flag = false;
		int count = this.getDao().insertAndReturnAffectedCount(
				"com.onlineshop.helloworld.bean.HelloWorld.add", test);
		if (count > 0) {
			flag = true;
		}
		return flag;
	}

	public GenericDao getDao() {
		return dao;
	}

	public void setDao(GenericDao dao) {
		this.dao = dao;
	}

}
